import { Modal } from 'antd'
import { ExclamationCircleOutlined } from '@ant-design/icons'
import React from 'react'

const confirmModal = (text: string) => {
  return new Promise((resolve) => {
    Modal.confirm({
      icon: <ExclamationCircleOutlined />,
      content: text,
      onOk() {
        resolve('')
      }
    })
  })
}

export default confirmModal
